#ifndef __SPIDEBUGGER_H__
#define __SPIDEBUGGER_H__

typedef struct
{
	uint8_t value1;
}SPI_DEBUGGER_send;

typedef struct
{
	uint8_t value1;
}SPI_DEBUGGER_recv;

typedef enum
{
	Type_uint8_t,
	Type_uint16_t,
	Type_uint32_t,
	Type_float,
}ElementType_t;

typedef struct
{
	void* element;
	ElementType_t type;
}spiTableElement_t;

typedef struct
{
	spiTableElement_t spiTableElement[10];
}spiTable_t;

extern uint8_t spi1_tx_buffer[10];
extern uint8_t spi1_rx_buffer[10];
extern uint8_t spi1_tx_end_flag;
extern uint8_t spi1_rx_end_flag;
extern uint8_t spi1_transfer_in_progress;

void SPI1_TransmitReceive_DMA_Master(uint8_t *txBuf, uint8_t *rxBuf, uint16_t len);
void SPI1_TransmitReceive_DMA_Slave(uint8_t *txBuf, uint8_t *rxBuf, uint16_t len);
void Clean_SPI_Buffer(SPI_HandleTypeDef *hspi);

#endif
